package com.itheima.myextends;
public class Ye {
    public int age = 80;
    String name = "李刚";


    protected void drink(){
        System.out.println("喝酒");
    }
}

class Fu extends Ye {
    public int age = 40;
    public void smoke() {
        System.out.println("抽烟");
    }

    @Override
    public void drink() {
        super.drink();
        System.out.println("喝健力宝");
    }
}
class Zi extends Fu{
        public void playGame(){
            System.out.println("打游戏");
        }

    @Override
    public void smoke() {
        System.out.println("抽华子");
    }

    @Override
    public void drink(){
            super.drink();
        System.out.println("喝冰可乐");
    }

    void show(){
            int age = 18;
            System.out.println(age);
            System.out.println(this.age);
            System.out.println(super.age);
            Ye ye = new Ye();
             System.out.println(ye.age);

        }

}



